<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="favicon.ico">
    <title>status - lamb</title>
    <link type="text/css" rel="stylesheet" href="/css/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="/css/bootstrap-theme.min.css">
    <link type="text/css" rel="stylesheet" href="/css/all.css">
    <link type="text/css" rel="stylesheet" href="/css/flat/blue.css">
    <link type="text/css" rel="stylesheet" href="/css/status.css">
  </head>
  <body>
    <div class="navbar navbar-default">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand">
            <img alt="Brand" src="/img/logo.png" width="32" height="32" style="margin-top:-6px" />
          </a>
          <a class="navbar-brand">lamb</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li><a href="/status/inbound">状态监控</a></li>
            <li><a href="/company">企业管理</a></li>
            <li><a href="/account">帐号管理</a></li>
            <li><a href="/template">签名模板</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">路由管理</a>
              <ul class="dropdown-menu">
                <li><a href="/routing">上行路由</a></li>
                <li><a href="/delivery">下行路由</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">通道管理</a>
              <ul class="dropdown-menu">
                <li><a href="/gateway">落地通道</a></li>
                <li><a href="/gateway/report">通道数据统计</a></li>
                <li><a href="/gateway/check">通道测试</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">数据记录</a>
              <ul class="dropdown-menu">
                <li><a href="/message">上行短信</a></li>
                <li><a href="/message/deliver">下行短信</a></li>
                <li><a href="/message/statistic">数据统计</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">系统管理</a>
              <ul class="dropdown-menu">
                <li><a href="/keyword">关键词库</a></li>
                <li><a href="/payment/logs">充值记录</a></li>
                <li><a href="/service/core">服务状态</a></li>
              </ul>
            </li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/logout"><span class="glyphicon glyphicon-log-out"></span> 退 出</a></li>
          </ul>
        </div>
      </div>
    </div>
    <div class="container">
      <div class="row">
        <ol class="breadcrumb">
          <li><a href="#">Home</a></li>
          <li><a href="#">Status</a></li>
          <li class="active">inbound</li>
        </ol>
      </div>
      <div class="row statistics">
        <span class="text-muted"> Client access status monitoring panel</span>
        <span class="item pull-right">
          <span class="glyphicon glyphicon-flag"></span>
          <select onchange="window.location=this.value">
            <option value="inbound" selected="selected">接入通道</option>
            <option value="outbound">落地通道</option>
          </select>
        </span>
      </div>
      <hr />
      <div class="row">
        <table class="table table-hover">
          <thead>
            <tr><th>#</th><th>接入帐号</th><th>公司名称</th><th>客户端地址</th><th>服务状态</th><th>流量速度</th><th>错误统计</th></tr>
          </thead>
          <tbody>
          </tbody>
        </table>
      </div>
    </div>
    <script id="contents" type="text/template">
      {{#each data}}
      <tr>
        <td><span class="glyphicon glyphicon-record"></span></td>
        <td>{{username}}</td>
        <td>{{company}}</td>
        <td>{{address}}</td>
        <td>{{checkstatus status}}</td>
        <td>{{speed}}/s</td>
        <td>{{error}}</td>
      </tr>
      {{/each}}
    </script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/handlebars.min.js"></script>
    <script type="text/javascript" src="/js/status.js"></script>
    <script type="text/javascript">
      $('li.dropdown').mouseover(function() {
        $(this).addClass('open');
      }).mouseout(function() {
        $(this).removeClass('open');
      });
      inbound();
    </script>
  </body>
</html>
